home *** CD-ROM | disk | FTP | other *** search
/ Pro One: Netcracker Netscape Navigator / ProOne: Netcracker Netscape Navigator.iso / pc / nc / wds / nc_quit.geo / 00021.ls < prev    next >
Encoding:
Text File  |  1997-03-19  |  5.9 KB  |  277 lines

  1. on startMovie
  2.   sound stop 2
  3.   tell the stage
  4.     pause()
  5.   end tell
  6.   set the exitLock to 1
  7.   set the puppet of sprite 2 to 1
  8.   set the puppet of sprite 3 to 1
  9.   set the cursor of sprite 2 to [406, 407]
  10.   set the cursor of sprite 3 to [406, 407]
  11.   cursor([402, 403])
  12.   PlaySound("NC_QUIT.S01")
  13. end
  14.  
  15. on PlaySound theSnd
  16.   if Get_PlayDub() then
  17.     sound playFile 2, theSnd
  18.   end if
  19. end
  20.  
  21. on Get_PlayDub
  22.   global PlayDub
  23.   return PlayDub
  24. end
  25.  
  26. on keyDown
  27.   if (the keyCode = 76) or (the keyCode = 36) then
  28.     set the castNum of sprite 2 to the number of cast "down1"
  29.     updateStage()
  30.     HandleYES()
  31.   end if
  32. end
  33.  
  34. on HandleYES
  35.   global CurrentFile, DicWindow, rearWinPointer
  36.   if not voidp(CurrentFile) then
  37.     tell the stage
  38.       SaveSeenScreens()
  39.     end tell
  40.     tell the stage
  41.       forget(DicWindow)
  42.     end tell
  43.     SaveToFile()
  44.   end if
  45.   if the machineType = 256 then
  46.     closeXLib("fileIO.dll")
  47.   else
  48.     rearWinPointer(mdispose)
  49.     closeXLib("netCracker:nc:RearWindow Xobj")
  50.   end if
  51.   tell the stage
  52.     leaveApplication()
  53.   end tell
  54. end
  55.  
  56. on HandleNO
  57.   tell the stage
  58.     closeQuitWindow()
  59.   end tell
  60. end
  61.  
  62. on SaveToFile
  63.   global HDfilePath, CDfilePath, PCDEL, FilePointer, CurrentFile
  64.   if objectp(FilePointer) then
  65.     FilePointer(mdispose)
  66.   end if
  67.   set FileData to Get_UserData()
  68.   set FilePointer to FileIO(mnew, "write", HDfilePath & CurrentFile & ".txt")
  69.   FilePointer(mWriteString, FileData)
  70.   if objectp(FilePointer) then
  71.     FilePointer(mdispose)
  72.   end if
  73. end
  74.  
  75. on Get_UserData
  76.   global HDfilePath, CDfilePath, PCDEL, FilePointer, CurrentFile, TAGS_DATA, TAGS_TITLES, TAGS_LIST, NotePadText, ScoreByTasksList
  77.   set theData to EMPTY
  78.   set save to the itemDelimiter
  79.   set the itemDelimiter to "$"
  80.   put TAGS_TITLES into item 1 of theData
  81.   put TAGS_DATA into item 2 of theData
  82.   put TAGS_LIST into item 3 of theData
  83.   put Get_WasInPathTool01() into line 1 of WasScreens
  84.   put Get_WasInPathTool02() into line 2 of WasScreens
  85.   put Get_WasInPathTool03() into line 3 of WasScreens
  86.   put Get_WasInPathTool04() into line 4 of WasScreens
  87.   put Get_WasInPathTool05() into line 5 of WasScreens
  88.   put Get_WasInPathTool06() into line 6 of WasScreens
  89.   put Get_WasInPathTool07() into line 7 of WasScreens
  90.   put Get_WasInPathTool08() into line 8 of WasScreens
  91.   put Get_WasInPathTool10() into line 10 of WasScreens
  92.   put Get_WasInPathTool11() into line 11 of WasScreens
  93.   put Get_WasInPathTool12() into line 12 of WasScreens
  94.   put Get_WasInPathTool13() into line 13 of WasScreens
  95.   put WasScreens into item 4 of theData
  96.   put NotePadText into item 5 of theData
  97.   put ScoreByTasksList into item 6 of theData
  98.   set the itemDelimiter to save
  99.   return theData
  100. end
  101.  
  102. on DeleteLIST theText
  103.   global IndexList
  104.   repeat with i = 1 to the number of chars in theText
  105.     if char i of theText = " " then
  106.       put "_" into char i of theText
  107.     end if
  108.   end repeat
  109.   deleteProp(IndexList, value("#" & theText))
  110. end
  111.  
  112. on wait int
  113.   set startTime to the ticks
  114.   repeat while (the ticks - startTime) < int
  115.   end repeat
  116. end
  117.  
  118. on stopMovie
  119.   repeat with i = 1 to 48
  120.     puppetSprite(i, 0)
  121.   end repeat
  122. end
  123.  
  124. on switchButt spriteNum, castDown, macroName
  125.   set flag to 0
  126.   set SaveCast to the castNum of sprite spriteNum
  127.   set flag to swapCast(spriteNum, SaveCast, castDown)
  128.   repeat while the stillDown
  129.     set flag to swapCast(spriteNum, SaveCast, castDown)
  130.   end repeat
  131.   if flag = 1 then
  132.     do(macroName)
  133.   end if
  134. end
  135.  
  136. on swapCast spriteNum, SaveCast, castDown
  137.   if rollOver(spriteNum) then
  138.     set the castNum of sprite spriteNum to the number of cast castDown
  139.     updateStage()
  140.     return 1
  141.   else
  142.     set the castNum of sprite spriteNum to the number of cast SaveCast
  143.     updateStage()
  144.     return 0
  145.   end if
  146. end
  147.  
  148. on Set_WasInPathTool01 theMode
  149.   global WasInPathTool01
  150.   set WasInPathTool01 to Get_SeenINPath()
  151. end
  152.  
  153. on Get_WasInPathTool01
  154.   global WasInPathTool01
  155.   return WasInPathTool01
  156. end
  157.  
  158. on Set_WasInPathTool02 theMode
  159.   global WasInPathTool02
  160.   set WasInPathTool02 to Get_SeenINPath()
  161. end
  162.  
  163. on Get_WasInPathTool02
  164.   global WasInPathTool02
  165.   return WasInPathTool02
  166. end
  167.  
  168. on Set_WasInPathTool03 theMode
  169.   global WasInPathTool03
  170.   set WasInPathTool03 to Get_SeenINPath()
  171. end
  172.  
  173. on Get_WasInPathTool03
  174.   global WasInPathTool03
  175.   return WasInPathTool03
  176. end
  177.  
  178. on Set_WasInPathTool04 theMode
  179.   global WasInPathTool04
  180.   set WasInPathTool04 to Get_SeenINPath()
  181. end
  182.  
  183. on Get_WasInPathTool04
  184.   global WasInPathTool04
  185.   return WasInPathTool04
  186. end
  187.  
  188. on Set_WasInPathTool05 theMode
  189.   global WasInPathTool05
  190.   set WasInPathTool015 to Get_SeenINPath()
  191. end
  192.  
  193. on Get_WasInPathTool05
  194.   global WasInPathTool05
  195.   return WasInPathTool05
  196. end
  197.  
  198. on Set_WasInPathTool06 theMode
  199.   global WasInPathTool06
  200.   set WasInPathTool06 to Get_SeenINPath()
  201. end
  202.  
  203. on Get_WasInPathTool06
  204.   global WasInPathTool06
  205.   return WasInPathTool06
  206. end
  207.  
  208. on Set_WasInPathTool07 theMode
  209.   global WasInPathTool07
  210.   set WasInPathTool07 to Get_SeenINPath()
  211. end
  212.  
  213. on Get_WasInPathTool07
  214.   global WasInPathTool07
  215.   return WasInPathTool07
  216. end
  217.  
  218. on Set_WasInPathTool08 theMode
  219.   global WasInPathTool08
  220.   set WasInPathTool08 to Get_SeenINPath()
  221. end
  222.  
  223. on Get_WasInPathTool08
  224.   global WasInPathTool08
  225.   return WasInPathTool08
  226. end
  227.  
  228. on Set_WasInPathTool09 theMode
  229.   global WasInPathTool09
  230.   set WasInPathTool09 to Get_SeenINPath()
  231. end
  232.  
  233. on Get_WasInPathTool09
  234.   global WasInPathTool09
  235.   return WasInPathTool09
  236. end
  237.  
  238. on Set_WasInPathTool10 theMode
  239.   global WasInPathTool10
  240.   set WasInPathTool10 to Get_SeenINPath()
  241. end
  242.  
  243. on Get_WasInPathTool10
  244.   global WasInPathTool10
  245.   return WasInPathTool10
  246. end
  247.  
  248. on Set_WasInPathTool11 theMode
  249.   global WasInPathTool11
  250.   set WasInPathTool11 to Get_SeenINPath()
  251. end
  252.  
  253. on Get_WasInPathTool11
  254.   global WasInPathTool11
  255.   return WasInPathTool11
  256. end
  257.  
  258. on Set_WasInPathTool12 theMode
  259.   global WasInPathTool12
  260.   set WasInPathTool12 to Get_SeenINPath()
  261. end
  262.  
  263. on Get_WasInPathTool12
  264.   global WasInPathTool12
  265.   return WasInPathTool12
  266. end
  267.  
  268. on Set_WasInPathTool13 theMode
  269.   global WasInPathTool13
  270.   set WasInPathTool13 to Get_SeenINPath()
  271. end
  272.  
  273. on Get_WasInPathTool13
  274.   global WasInPathTool13
  275.   return WasInPathTool13
  276. end
  277.